using System;
using System.Data;
using System.Collections.Generic;
using System.Collections;
using log4net;
using FSS.BLL.Entities;
namespace FSS.BLL.Services
{
	#region ProductPriceService

	/// <summary>
	/// ProductPriceService object for Ibatis mapped table 'ProductPrice'.
	/// </summary>
	public class ProductPriceService : IProductPriceService
	{
		private static readonly ILog log = LogManager.GetLogger(typeof(ProductPriceService).Name);
	  	private static volatile ProductPriceService _ProductPriceService = null;
        public static ProductPriceService GetInstance()
        {
            if (_ProductPriceService == null)
            {
                lock (typeof(ProductPriceService))
                {
                    if (_ProductPriceService == null) // double-check
                        _ProductPriceService = new ProductPriceService();
                }
            }
            return _ProductPriceService;
        }
		public ProductPriceService()
        {
            //
            // TODO: Add constructor logic here
            //
        }
        public IList<ProductPriceEntity> LoadByProductId(ProductPriceEntity objE)
        {
            try
            {
                return ExecuteQueryForList<ProductPriceEntity>("ProductPriceLoadByProductId", objE);
            }
            catch (Exception ex)
            {
                log.Debug(ex.Message);
                return null;
            }
        }
        public IList<ProductPriceEntity> LoadByDate(ProductPriceEntity objE)
        {
            try
            {
                return ExecuteQueryForList<ProductPriceEntity>("ProductPriceLoadByteDate", objE);
            }
            catch (Exception ex)
            {
                log.Debug(ex.Message);
                return null;
            }
        }
	}
	#endregion  
}
